package com.bus.core.channels;

import com.bus.core.BusChannelClient;
import com.bus.core.bean.Input2OutputBean;
import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;

public interface ProductBusChannelClient extends BusChannelClient {

    String INPUT_PRODUCT = "inputProduct";
    String OUTPUT_PRODUCT = "outputProduct";
    String TOPIC="product";

    Input2OutputBean INPUT_2_OUTPUT_BEAN=new Input2OutputBean( INPUT_PRODUCT,OUTPUT_PRODUCT,TOPIC);

    @Input(INPUT_PRODUCT)
    SubscribableChannel inputProduct();

    @Output(OUTPUT_PRODUCT)
    MessageChannel outputProduct();
}
